/*
    Matali Physics Demo
    Copyright (c) 2011 KOMIRES Sp. z o. o.
 */
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;
using Komires.MataliPhysics;

namespace MataliPhysicsDemo
{
    /// <summary>
    /// This is the main type for your game
    /// </summary>
    public class StaticMesh1
    {
        Demo demo;
        PhysicsScene scene;
        string instanceIndexName;

        // Data generated with CreateBezier function of the Matali Physics Pro version
        static ushort[] meshIndices = new ushort[] { 0, 1, 26, 26, 25, 0, 1, 2, 27, 27, 26, 1, 2, 3, 28, 28, 27, 2, 3, 4, 29, 29, 28, 3, 4, 5, 30, 30, 29, 4, 5, 6, 31, 31, 30, 5, 
                                    6, 7, 32, 32, 31, 6, 7, 8, 33, 33, 32, 7, 8, 9, 34, 34, 33, 8, 9, 10, 35, 35, 34, 9, 10, 11, 36, 36, 35, 10, 11, 12, 37, 37, 36, 11, 
                                    12, 13, 38, 38, 37, 12, 13, 14, 39, 39, 38, 13, 14, 15, 40, 40, 39, 14, 15, 16, 41, 41, 40, 15, 16, 17, 42, 42, 41, 16, 17, 18, 43, 43, 42, 17, 
                                    18, 19, 44, 44, 43, 18, 19, 20, 45, 45, 44, 19, 20, 21, 46, 46, 45, 20, 21, 22, 47, 47, 46, 21, 22, 23, 48, 48, 47, 22, 23, 24, 49, 49, 48, 23, 
                                    25, 26, 51, 51, 50, 25, 26, 27, 52, 52, 51, 26, 27, 28, 53, 53, 52, 27, 28, 29, 54, 54, 53, 28, 29, 30, 55, 55, 54, 29, 30, 31, 56, 56, 55, 30, 
                                    31, 32, 57, 57, 56, 31, 32, 33, 58, 58, 57, 32, 33, 34, 59, 59, 58, 33, 34, 35, 60, 60, 59, 34, 35, 36, 61, 61, 60, 35, 36, 37, 62, 62, 61, 36, 
                                    37, 38, 63, 63, 62, 37, 38, 39, 64, 64, 63, 38, 39, 40, 65, 65, 64, 39, 40, 41, 66, 66, 65, 40, 41, 42, 67, 67, 66, 41, 42, 43, 68, 68, 67, 42, 
                                    43, 44, 69, 69, 68, 43, 44, 45, 70, 70, 69, 44, 45, 46, 71, 71, 70, 45, 46, 47, 72, 72, 71, 46, 47, 48, 73, 73, 72, 47, 48, 49, 74, 74, 73, 48, 
                                    50, 51, 76, 76, 75, 50, 51, 52, 77, 77, 76, 51, 52, 53, 78, 78, 77, 52, 53, 54, 79, 79, 78, 53, 54, 55, 80, 80, 79, 54, 55, 56, 81, 81, 80, 55, 
                                    56, 57, 82, 82, 81, 56, 57, 58, 83, 83, 82, 57, 58, 59, 84, 84, 83, 58, 59, 60, 85, 85, 84, 59, 60, 61, 86, 86, 85, 60, 61, 62, 87, 87, 86, 61, 
                                    62, 63, 88, 88, 87, 62, 63, 64, 89, 89, 88, 63, 64, 65, 90, 90, 89, 64, 65, 66, 91, 91, 90, 65, 66, 67, 92, 92, 91, 66, 67, 68, 93, 93, 92, 67, 
                                    68, 69, 94, 94, 93, 68, 69, 70, 95, 95, 94, 69, 70, 71, 96, 96, 95, 70, 71, 72, 97, 97, 96, 71, 72, 73, 98, 98, 97, 72, 73, 74, 99, 99, 98, 73, 
                                    75, 76, 101, 101, 100, 75, 76, 77, 102, 102, 101, 76, 77, 78, 103, 103, 102, 77, 78, 79, 104, 104, 103, 78, 79, 80, 105, 105, 104, 79, 80, 81, 106, 106, 105, 80, 
                                    81, 82, 107, 107, 106, 81, 82, 83, 108, 108, 107, 82, 83, 84, 109, 109, 108, 83, 84, 85, 110, 110, 109, 84, 85, 86, 111, 111, 110, 85, 86, 87, 112, 112, 111, 86, 
                                    87, 88, 113, 113, 112, 87, 88, 89, 114, 114, 113, 88, 89, 90, 115, 115, 114, 89, 90, 91, 116, 116, 115, 90, 91, 92, 117, 117, 116, 91, 92, 93, 118, 118, 117, 92, 
                                    93, 94, 119, 119, 118, 93, 94, 95, 120, 120, 119, 94, 95, 96, 121, 121, 120, 95, 96, 97, 122, 122, 121, 96, 97, 98, 123, 123, 122, 97, 98, 99, 124, 124, 123, 98, 
                                    100, 101, 126, 126, 125, 100, 101, 102, 127, 127, 126, 101, 102, 103, 128, 128, 127, 102, 103, 104, 129, 129, 128, 103, 104, 105, 130, 130, 129, 104, 105, 106, 131, 131, 130, 105, 
                                    106, 107, 132, 132, 131, 106, 107, 108, 133, 133, 132, 107, 108, 109, 134, 134, 133, 108, 109, 110, 135, 135, 134, 109, 110, 111, 136, 136, 135, 110, 111, 112, 137, 137, 136, 111, 
                                    112, 113, 138, 138, 137, 112, 113, 114, 139, 139, 138, 113, 114, 115, 140, 140, 139, 114, 115, 116, 141, 141, 140, 115, 116, 117, 142, 142, 141, 116, 117, 118, 143, 143, 142, 117, 
                                    118, 119, 144, 144, 143, 118, 119, 120, 145, 145, 144, 119, 120, 121, 146, 146, 145, 120, 121, 122, 147, 147, 146, 121, 122, 123, 148, 148, 147, 122, 123, 124, 149, 149, 148, 123, 
                                    125, 126, 151, 151, 150, 125, 126, 127, 152, 152, 151, 126, 127, 128, 153, 153, 152, 127, 128, 129, 154, 154, 153, 128, 129, 130, 155, 155, 154, 129, 130, 131, 156, 156, 155, 130, 
                                    131, 132, 157, 157, 156, 131, 132, 133, 158, 158, 157, 132, 133, 134, 159, 159, 158, 133, 134, 135, 160, 160, 159, 134, 135, 136, 161, 161, 160, 135, 136, 137, 162, 162, 161, 136, 
                                    137, 138, 163, 163, 162, 137, 138, 139, 164, 164, 163, 138, 139, 140, 165, 165, 164, 139, 140, 141, 166, 166, 165, 140, 141, 142, 167, 167, 166, 141, 142, 143, 168, 168, 167, 142, 
                                    143, 144, 169, 169, 168, 143, 144, 145, 170, 170, 169, 144, 145, 146, 171, 171, 170, 145, 146, 147, 172, 172, 171, 146, 147, 148, 173, 173, 172, 147, 148, 149, 174, 174, 173, 148, 
                                    150, 151, 176, 176, 175, 150, 151, 152, 177, 177, 176, 151, 152, 153, 178, 178, 177, 152, 153, 154, 179, 179, 178, 153, 154, 155, 180, 180, 179, 154, 155, 156, 181, 181, 180, 155, 
                                    156, 157, 182, 182, 181, 156, 157, 158, 183, 183, 182, 157, 158, 159, 184, 184, 183, 158, 159, 160, 185, 185, 184, 159, 160, 161, 186, 186, 185, 160, 161, 162, 187, 187, 186, 161, 
                                    162, 163, 188, 188, 187, 162, 163, 164, 189, 189, 188, 163, 164, 165, 190, 190, 189, 164, 165, 166, 191, 191, 190, 165, 166, 167, 192, 192, 191, 166, 167, 168, 193, 193, 192, 167, 
                                    168, 169, 194, 194, 193, 168, 169, 170, 195, 195, 194, 169, 170, 171, 196, 196, 195, 170, 171, 172, 197, 197, 196, 171, 172, 173, 198, 198, 197, 172, 173, 174, 199, 199, 198, 173, 
                                    175, 176, 201, 201, 200, 175, 176, 177, 202, 202, 201, 176, 177, 178, 203, 203, 202, 177, 178, 179, 204, 204, 203, 178, 179, 180, 205, 205, 204, 179, 180, 181, 206, 206, 205, 180, 
                                    181, 182, 207, 207, 206, 181, 182, 183, 208, 208, 207, 182, 183, 184, 209, 209, 208, 183, 184, 185, 210, 210, 209, 184, 185, 186, 211, 211, 210, 185, 186, 187, 212, 212, 211, 186, 
                                    187, 188, 213, 213, 212, 187, 188, 189, 214, 214, 213, 188, 189, 190, 215, 215, 214, 189, 190, 191, 216, 216, 215, 190, 191, 192, 217, 217, 216, 191, 192, 193, 218, 218, 217, 192, 
                                    193, 194, 219, 219, 218, 193, 194, 195, 220, 220, 219, 194, 195, 196, 221, 221, 220, 195, 196, 197, 222, 222, 221, 196, 197, 198, 223, 223, 222, 197, 198, 199, 224, 224, 223, 198, 
                                    200, 201, 226, 226, 225, 200, 201, 202, 227, 227, 226, 201, 202, 203, 228, 228, 227, 202, 203, 204, 229, 229, 228, 203, 204, 205, 230, 230, 229, 204, 205, 206, 231, 231, 230, 205, 
                                    206, 207, 232, 232, 231, 206, 207, 208, 233, 233, 232, 207, 208, 209, 234, 234, 233, 208, 209, 210, 235, 235, 234, 209, 210, 211, 236, 236, 235, 210, 211, 212, 237, 237, 236, 211, 
                                    212, 213, 238, 238, 237, 212, 213, 214, 239, 239, 238, 213, 214, 215, 240, 240, 239, 214, 215, 216, 241, 241, 240, 215, 216, 217, 242, 242, 241, 216, 217, 218, 243, 243, 242, 217, 
                                    218, 219, 244, 244, 243, 218, 219, 220, 245, 245, 244, 219, 220, 221, 246, 246, 245, 220, 221, 222, 247, 247, 246, 221, 222, 223, 248, 248, 247, 222, 223, 224, 249, 249, 248, 223, 
                                    225, 226, 251, 251, 250, 225, 226, 227, 252, 252, 251, 226, 227, 228, 253, 253, 252, 227, 228, 229, 254, 254, 253, 228, 229, 230, 255, 255, 254, 229, 230, 231, 256, 256, 255, 230, 
                                    231, 232, 257, 257, 256, 231, 232, 233, 258, 258, 257, 232, 233, 234, 259, 259, 258, 233, 234, 235, 260, 260, 259, 234, 235, 236, 261, 261, 260, 235, 236, 237, 262, 262, 261, 236, 
                                    237, 238, 263, 263, 262, 237, 238, 239, 264, 264, 263, 238, 239, 240, 265, 265, 264, 239, 240, 241, 266, 266, 265, 240, 241, 242, 267, 267, 266, 241, 242, 243, 268, 268, 267, 242, 
                                    243, 244, 269, 269, 268, 243, 244, 245, 270, 270, 269, 244, 245, 246, 271, 271, 270, 245, 246, 247, 272, 272, 271, 246, 247, 248, 273, 273, 272, 247, 248, 249, 274, 274, 273, 248, 
                                    250, 251, 276, 276, 275, 250, 251, 252, 277, 277, 276, 251, 252, 253, 278, 278, 277, 252, 253, 254, 279, 279, 278, 253, 254, 255, 280, 280, 279, 254, 255, 256, 281, 281, 280, 255, 
                                    256, 257, 282, 282, 281, 256, 257, 258, 283, 283, 282, 257, 258, 259, 284, 284, 283, 258, 259, 260, 285, 285, 284, 259, 260, 261, 286, 286, 285, 260, 261, 262, 287, 287, 286, 261, 
                                    262, 263, 288, 288, 287, 262, 263, 264, 289, 289, 288, 263, 264, 265, 290, 290, 289, 264, 265, 266, 291, 291, 290, 265, 266, 267, 292, 292, 291, 266, 267, 268, 293, 293, 292, 267, 
                                    268, 269, 294, 294, 293, 268, 269, 270, 295, 295, 294, 269, 270, 271, 296, 296, 295, 270, 271, 272, 297, 297, 296, 271, 272, 273, 298, 298, 297, 272, 273, 274, 299, 299, 298, 273, 
                                    275, 276, 301, 301, 300, 275, 276, 277, 302, 302, 301, 276, 277, 278, 303, 303, 302, 277, 278, 279, 304, 304, 303, 278, 279, 280, 305, 305, 304, 279, 280, 281, 306, 306, 305, 280, 
                                    281, 282, 307, 307, 306, 281, 282, 283, 308, 308, 307, 282, 283, 284, 309, 309, 308, 283, 284, 285, 310, 310, 309, 284, 285, 286, 311, 311, 310, 285, 286, 287, 312, 312, 311, 286, 
                                    287, 288, 313, 313, 312, 287, 288, 289, 314, 314, 313, 288, 289, 290, 315, 315, 314, 289, 290, 291, 316, 316, 315, 290, 291, 292, 317, 317, 316, 291, 292, 293, 318, 318, 317, 292, 
                                    293, 294, 319, 319, 318, 293, 294, 295, 320, 320, 319, 294, 295, 296, 321, 321, 320, 295, 296, 297, 322, 322, 321, 296, 297, 298, 323, 323, 322, 297, 298, 299, 324, 324, 323, 298, 
                                    300, 301, 326, 326, 325, 300, 301, 302, 327, 327, 326, 301, 302, 303, 328, 328, 327, 302, 303, 304, 329, 329, 328, 303, 304, 305, 330, 330, 329, 304, 305, 306, 331, 331, 330, 305, 
                                    306, 307, 332, 332, 331, 306, 307, 308, 333, 333, 332, 307, 308, 309, 334, 334, 333, 308, 309, 310, 335, 335, 334, 309, 310, 311, 336, 336, 335, 310, 311, 312, 337, 337, 336, 311, 
                                    312, 313, 338, 338, 337, 312, 313, 314, 339, 339, 338, 313, 314, 315, 340, 340, 339, 314, 315, 316, 341, 341, 340, 315, 316, 317, 342, 342, 341, 316, 317, 318, 343, 343, 342, 317, 
                                    318, 319, 344, 344, 343, 318, 319, 320, 345, 345, 344, 319, 320, 321, 346, 346, 345, 320, 321, 322, 347, 347, 346, 321, 322, 323, 348, 348, 347, 322, 323, 324, 349, 349, 348, 323, 
                                    325, 326, 351, 351, 350, 325, 326, 327, 352, 352, 351, 326, 327, 328, 353, 353, 352, 327, 328, 329, 354, 354, 353, 328, 329, 330, 355, 355, 354, 329, 330, 331, 356, 356, 355, 330, 
                                    331, 332, 357, 357, 356, 331, 332, 333, 358, 358, 357, 332, 333, 334, 359, 359, 358, 333, 334, 335, 360, 360, 359, 334, 335, 336, 361, 361, 360, 335, 336, 337, 362, 362, 361, 336, 
                                    337, 338, 363, 363, 362, 337, 338, 339, 364, 364, 363, 338, 339, 340, 365, 365, 364, 339, 340, 341, 366, 366, 365, 340, 341, 342, 367, 367, 366, 341, 342, 343, 368, 368, 367, 342, 
                                    343, 344, 369, 369, 368, 343, 344, 345, 370, 370, 369, 344, 345, 346, 371, 371, 370, 345, 346, 347, 372, 372, 371, 346, 347, 348, 373, 373, 372, 347, 348, 349, 374, 374, 373, 348, 
                                    350, 351, 376, 376, 375, 350, 351, 352, 377, 377, 376, 351, 352, 353, 378, 378, 377, 352, 353, 354, 379, 379, 378, 353, 354, 355, 380, 380, 379, 354, 355, 356, 381, 381, 380, 355, 
                                    356, 357, 382, 382, 381, 356, 357, 358, 383, 383, 382, 357, 358, 359, 384, 384, 383, 358, 359, 360, 385, 385, 384, 359, 360, 361, 386, 386, 385, 360, 361, 362, 387, 387, 386, 361, 
                                    362, 363, 388, 388, 387, 362, 363, 364, 389, 389, 388, 363, 364, 365, 390, 390, 389, 364, 365, 366, 391, 391, 390, 365, 366, 367, 392, 392, 391, 366, 367, 368, 393, 393, 392, 367, 
                                    368, 369, 394, 394, 393, 368, 369, 370, 395, 395, 394, 369, 370, 371, 396, 396, 395, 370, 371, 372, 397, 397, 396, 371, 372, 373, 398, 398, 397, 372, 373, 374, 399, 399, 398, 373, 
                                    375, 376, 401, 401, 400, 375, 376, 377, 402, 402, 401, 376, 377, 378, 403, 403, 402, 377, 378, 379, 404, 404, 403, 378, 379, 380, 405, 405, 404, 379, 380, 381, 406, 406, 405, 380, 
                                    381, 382, 407, 407, 406, 381, 382, 383, 408, 408, 407, 382, 383, 384, 409, 409, 408, 383, 384, 385, 410, 410, 409, 384, 385, 386, 411, 411, 410, 385, 386, 387, 412, 412, 411, 386, 
                                    387, 388, 413, 413, 412, 387, 388, 389, 414, 414, 413, 388, 389, 390, 415, 415, 414, 389, 390, 391, 416, 416, 415, 390, 391, 392, 417, 417, 416, 391, 392, 393, 418, 418, 417, 392, 
                                    393, 394, 419, 419, 418, 393, 394, 395, 420, 420, 419, 394, 395, 396, 421, 421, 420, 395, 396, 397, 422, 422, 421, 396, 397, 398, 423, 423, 422, 397, 398, 399, 424, 424, 423, 398, 
                                    400, 401, 426, 426, 425, 400, 401, 402, 427, 427, 426, 401, 402, 403, 428, 428, 427, 402, 403, 404, 429, 429, 428, 403, 404, 405, 430, 430, 429, 404, 405, 406, 431, 431, 430, 405, 
                                    406, 407, 432, 432, 431, 406, 407, 408, 433, 433, 432, 407, 408, 409, 434, 434, 433, 408, 409, 410, 435, 435, 434, 409, 410, 411, 436, 436, 435, 410, 411, 412, 437, 437, 436, 411, 
                                    412, 413, 438, 438, 437, 412, 413, 414, 439, 439, 438, 413, 414, 415, 440, 440, 439, 414, 415, 416, 441, 441, 440, 415, 416, 417, 442, 442, 441, 416, 417, 418, 443, 443, 442, 417, 
                                    418, 419, 444, 444, 443, 418, 419, 420, 445, 445, 444, 419, 420, 421, 446, 446, 445, 420, 421, 422, 447, 447, 446, 421, 422, 423, 448, 448, 447, 422, 423, 424, 449, 449, 448, 423, 
                                    425, 426, 451, 451, 450, 425, 426, 427, 452, 452, 451, 426, 427, 428, 453, 453, 452, 427, 428, 429, 454, 454, 453, 428, 429, 430, 455, 455, 454, 429, 430, 431, 456, 456, 455, 430, 
                                    431, 432, 457, 457, 456, 431, 432, 433, 458, 458, 457, 432, 433, 434, 459, 459, 458, 433, 434, 435, 460, 460, 459, 434, 435, 436, 461, 461, 460, 435, 436, 437, 462, 462, 461, 436, 
                                    437, 438, 463, 463, 462, 437, 438, 439, 464, 464, 463, 438, 439, 440, 465, 465, 464, 439, 440, 441, 466, 466, 465, 440, 441, 442, 467, 467, 466, 441, 442, 443, 468, 468, 467, 442, 
                                    443, 444, 469, 469, 468, 443, 444, 445, 470, 470, 469, 444, 445, 446, 471, 471, 470, 445, 446, 447, 472, 472, 471, 446, 447, 448, 473, 473, 472, 447, 448, 449, 474, 474, 473, 448, 
                                    450, 451, 476, 476, 475, 450, 451, 452, 477, 477, 476, 451, 452, 453, 478, 478, 477, 452, 453, 454, 479, 479, 478, 453, 454, 455, 480, 480, 479, 454, 455, 456, 481, 481, 480, 455, 
                                    456, 457, 482, 482, 481, 456, 457, 458, 483, 483, 482, 457, 458, 459, 484, 484, 483, 458, 459, 460, 485, 485, 484, 459, 460, 461, 486, 486, 485, 460, 461, 462, 487, 487, 486, 461, 
                                    462, 463, 488, 488, 487, 462, 463, 464, 489, 489, 488, 463, 464, 465, 490, 490, 489, 464, 465, 466, 491, 491, 490, 465, 466, 467, 492, 492, 491, 466, 467, 468, 493, 493, 492, 467, 
                                    468, 469, 494, 494, 493, 468, 469, 470, 495, 495, 494, 469, 470, 471, 496, 496, 495, 470, 471, 472, 497, 497, 496, 471, 472, 473, 498, 498, 497, 472, 473, 474, 499, 499, 498, 473, 
                                    475, 476, 501, 501, 500, 475, 476, 477, 502, 502, 501, 476, 477, 478, 503, 503, 502, 477, 478, 479, 504, 504, 503, 478, 479, 480, 505, 505, 504, 479, 480, 481, 506, 506, 505, 480, 
                                    481, 482, 507, 507, 506, 481, 482, 483, 508, 508, 507, 482, 483, 484, 509, 509, 508, 483, 484, 485, 510, 510, 509, 484, 485, 486, 511, 511, 510, 485, 486, 487, 512, 512, 511, 486, 
                                    487, 488, 513, 513, 512, 487, 488, 489, 514, 514, 513, 488, 489, 490, 515, 515, 514, 489, 490, 491, 516, 516, 515, 490, 491, 492, 517, 517, 516, 491, 492, 493, 518, 518, 517, 492, 
                                    493, 494, 519, 519, 518, 493, 494, 495, 520, 520, 519, 494, 495, 496, 521, 521, 520, 495, 496, 497, 522, 522, 521, 496, 497, 498, 523, 523, 522, 497, 498, 499, 524, 524, 523, 498, 
                                    500, 501, 526, 526, 525, 500, 501, 502, 527, 527, 526, 501, 502, 503, 528, 528, 527, 502, 503, 504, 529, 529, 528, 503, 504, 505, 530, 530, 529, 504, 505, 506, 531, 531, 530, 505, 
                                    506, 507, 532, 532, 531, 506, 507, 508, 533, 533, 532, 507, 508, 509, 534, 534, 533, 508, 509, 510, 535, 535, 534, 509, 510, 511, 536, 536, 535, 510, 511, 512, 537, 537, 536, 511, 
                                    512, 513, 538, 538, 537, 512, 513, 514, 539, 539, 538, 513, 514, 515, 540, 540, 539, 514, 515, 516, 541, 541, 540, 515, 516, 517, 542, 542, 541, 516, 517, 518, 543, 543, 542, 517, 
                                    518, 519, 544, 544, 543, 518, 519, 520, 545, 545, 544, 519, 520, 521, 546, 546, 545, 520, 521, 522, 547, 547, 546, 521, 522, 523, 548, 548, 547, 522, 523, 524, 549, 549, 548, 523, 
                                    525, 526, 551, 551, 550, 525, 526, 527, 552, 552, 551, 526, 527, 528, 553, 553, 552, 527, 528, 529, 554, 554, 553, 528, 529, 530, 555, 555, 554, 529, 530, 531, 556, 556, 555, 530, 
                                    531, 532, 557, 557, 556, 531, 532, 533, 558, 558, 557, 532, 533, 534, 559, 559, 558, 533, 534, 535, 560, 560, 559, 534, 535, 536, 561, 561, 560, 535, 536, 537, 562, 562, 561, 536, 
                                    537, 538, 563, 563, 562, 537, 538, 539, 564, 564, 563, 538, 539, 540, 565, 565, 564, 539, 540, 541, 566, 566, 565, 540, 541, 542, 567, 567, 566, 541, 542, 543, 568, 568, 567, 542, 
                                    543, 544, 569, 569, 568, 543, 544, 545, 570, 570, 569, 544, 545, 546, 571, 571, 570, 545, 546, 547, 572, 572, 571, 546, 547, 548, 573, 573, 572, 547, 548, 549, 574, 574, 573, 548, 
                                    550, 551, 576, 576, 575, 550, 551, 552, 577, 577, 576, 551, 552, 553, 578, 578, 577, 552, 553, 554, 579, 579, 578, 553, 554, 555, 580, 580, 579, 554, 555, 556, 581, 581, 580, 555, 
                                    556, 557, 582, 582, 581, 556, 557, 558, 583, 583, 582, 557, 558, 559, 584, 584, 583, 558, 559, 560, 585, 585, 584, 559, 560, 561, 586, 586, 585, 560, 561, 562, 587, 587, 586, 561, 
                                    562, 563, 588, 588, 587, 562, 563, 564, 589, 589, 588, 563, 564, 565, 590, 590, 589, 564, 565, 566, 591, 591, 590, 565, 566, 567, 592, 592, 591, 566, 567, 568, 593, 593, 592, 567, 
                                    568, 569, 594, 594, 593, 568, 569, 570, 595, 595, 594, 569, 570, 571, 596, 596, 595, 570, 571, 572, 597, 597, 596, 571, 572, 573, 598, 598, 597, 572, 573, 574, 599, 599, 598, 573, 
                                    575, 576, 601, 601, 600, 575, 576, 577, 602, 602, 601, 576, 577, 578, 603, 603, 602, 577, 578, 579, 604, 604, 603, 578, 579, 580, 605, 605, 604, 579, 580, 581, 606, 606, 605, 580, 
                                    581, 582, 607, 607, 606, 581, 582, 583, 608, 608, 607, 582, 583, 584, 609, 609, 608, 583, 584, 585, 610, 610, 609, 584, 585, 586, 611, 611, 610, 585, 586, 587, 612, 612, 611, 586, 
                                    587, 588, 613, 613, 612, 587, 588, 589, 614, 614, 613, 588, 589, 590, 615, 615, 614, 589, 590, 591, 616, 616, 615, 590, 591, 592, 617, 617, 616, 591, 592, 593, 618, 618, 617, 592, 
                                    593, 594, 619, 619, 618, 593, 594, 595, 620, 620, 619, 594, 595, 596, 621, 621, 620, 595, 596, 597, 622, 622, 621, 596, 597, 598, 623, 623, 622, 597, 598, 599, 624, 624, 623, 598 };

        static Vector3[] meshPositions = new Vector3[] { new Vector3(-960f, -400f, 450f), new Vector3(-960f, -329.6736f, 570.1019f), new Vector3(-960f, -278.7889f, 680.8989f), 
                                              new Vector3(-960f, -245.1447f, 781.9061f), new Vector3(-960f, -226.5392f, 872.6382f), new Vector3(-960f, -220.7711f, 952.6101f), 
                                              new Vector3(-960f, -225.6388f, 1021.337f), new Vector3(-960f, -238.9407f, 1078.333f), new Vector3(-960f, -258.4754f, 1123.114f), 
                                              new Vector3(-960f, -282.0414f, 1155.195f), new Vector3(-960f, -307.4372f, 1174.089f), new Vector3(-960f, -332.4612f, 1179.314f), 
                                              new Vector3(-960f, -354.9118f, 1170.382f), new Vector3(-960f, -372.5878f, 1146.809f), new Vector3(-960f, -383.2874f, 1108.111f), 
                                              new Vector3(-960f, -384.8093f, 1053.801f), new Vector3(-960f, -374.9518f, 983.3947f), new Vector3(-960f, -351.5135f, 896.4073f), 
                                              new Vector3(-960f, -312.2928f, 792.3535f), new Vector3(-960f, -255.0883f, 670.748f), new Vector3(-960f, -177.6983f, 531.106f), 
                                              new Vector3(-960f, -77.92139f, 372.9421f), new Vector3(-960f, 46.44388f, 195.7716f), new Vector3(-960f, 197.5991f, -0.8909912f), 
                                              new Vector3(-960f, 377.7458f, -217.5306f), new Vector3(-896.8325f, -329.6736f, 450f), new Vector3(-894.2007f, -265.2335f, 575.1058f), 
                                              new Vector3(-891.3425f, -220.563f, 690.519f), new Vector3(-888.2337f, -193.5138f, 795.7346f), new Vector3(-884.8499f, -181.9377f, 890.247f), 
                                              new Vector3(-881.167f, -183.6864f, 973.5508f), new Vector3(-877.1607f, -196.6119f, 1045.141f), new Vector3(-872.8067f, -218.5657f, 1104.512f), 
                                              new Vector3(-868.0807f, -247.3996f, 1151.159f), new Vector3(-862.9586f, -280.9656f, 1184.576f), new Vector3(-857.4161f, -317.1153f, 1204.258f), 
                                              new Vector3(-851.4288f, -353.7005f, 1209.7f), new Vector3(-844.9726f, -388.573f, 1200.396f), new Vector3(-838.0231f, -419.5845f, 1175.841f), 
                                              new Vector3(-830.5563f, -444.5869f, 1135.53f), new Vector3(-822.5476f, -461.4319f, 1078.958f), new Vector3(-813.973f, -467.9713f, 1005.618f), 
                                              new Vector3(-804.8082f, -462.0569f, 915.0063f), new Vector3(-795.0288f, -441.5403f, 806.6172f), new Vector3(-784.6107f, -404.2734f, 679.9453f), 
                                              new Vector3(-773.5297f, -348.108f, 534.4852f), new Vector3(-761.7614f, -270.8957f, 369.7316f), new Vector3(-749.2814f, -170.4886f, 185.1795f), 
                                              new Vector3(-736.0657f, -44.73801f, -19.67697f), new Vector3(-722.0901f, 108.5038f, -245.3427f), new Vector3(-832.8026f, -278.7889f, 450f), 
                                              new Vector3(-827.503f, -220.563f, 580.5402f), new Vector3(-821.7476f, -181.8032f, 700.9669f), new Vector3(-815.4874f, -160.4611f, 810.7527f), 
                                              new Vector3(-808.6737f, -154.4882f, 909.3706f), new Vector3(-801.2576f, -161.8362f, 996.293f), new Vector3(-793.1902f, -180.4565f, 1070.993f), 
                                              new Vector3(-784.4227f, -208.3005f, 1132.943f), new Vector3(-774.9063f, -243.3199f, 1181.616f), new Vector3(-764.5922f, -283.4662f, 1216.484f), 
                                              new Vector3(-753.4314f, -326.691f, 1237.021f), new Vector3(-741.3751f, -370.9456f, 1242.7f), new Vector3(-728.3745f, -414.1818f, 1232.992f), 
                                              new Vector3(-714.3807f, -454.3509f, 1207.37f), new Vector3(-699.345f, -489.4046f, 1165.308f), new Vector3(-683.2184f, -517.2945f, 1106.278f), 
                                              new Vector3(-665.9521f, -535.9717f, 1029.753f), new Vector3(-647.4972f, -543.3882f, 935.2054f), new Vector3(-627.805f, -537.4953f, 822.108f), 
                                              new Vector3(-606.8265f, -516.2445f, 689.9337f), new Vector3(-584.5131f, -477.5874f, 538.155f), new Vector3(-560.8157f, -419.4754f, 366.2449f), 
                                              new Vector3(-535.6855f, -339.8604f, 173.6761f), new Vector3(-509.0738f, -236.6934f, -40.0788f), new Vector3(-480.9315f, -107.9263f, -275.5471f), 
                                              new Vector3(-767.623f, -245.1447f, 450f), new Vector3(-759.6078f, -193.5138f, 586.4512f), new Vector3(-750.9031f, -160.4611f, 712.3307f), 
                                              new Vector3(-741.4351f, -144.082f, 827.0878f), new Vector3(-731.1298f, -142.4718f, 930.171f), new Vector3(-719.9135f, -153.7258f, 1021.029f), 
                                              new Vector3(-707.7122f, -175.9393f, 1099.112f), new Vector3(-694.452f, -207.2076f, 1163.867f), new Vector3(-680.0591f, -245.6261f, 1214.744f), 
                                              new Vector3(-664.4597f, -289.2901f, 1251.191f), new Vector3(-647.5798f, -336.2949f, 1272.658f), new Vector3(-629.3455f, -384.7358f, 1278.594f), 
                                              new Vector3(-609.683f, -432.7081f, 1268.446f), new Vector3(-588.5184f, -478.3073f, 1241.664f), new Vector3(-565.778f, -519.6285f, 1197.698f), 
                                              new Vector3(-541.3876f, -554.7671f, 1135.995f), new Vector3(-515.2736f, -581.8184f, 1056.005f), new Vector3(-487.362f, -598.8778f, 957.1758f), 
                                              new Vector3(-457.5789f, -604.0405f, 838.9573f), new Vector3(-425.8505f, -595.4019f, 700.7981f), new Vector3(-392.1028f, -571.0571f, 542.1468f), 
                                              new Vector3(-356.2623f, -529.1017f, 362.4525f), new Vector3(-318.2548f, -467.6309f, 161.164f), new Vector3(-278.0063f, -384.7401f, -62.26984f), 
                                              new Vector3(-235.4432f, -278.5243f, -308.4002f), new Vector3(-701.0068f, -226.5392f, 450f), new Vector3(-690.2162f, -181.9377f, 592.8848f), 
                                              new Vector3(-678.4972f, -154.4882f, 724.6996f), new Vector3(-665.7506f, -142.4718f, 844.8674f), new Vector3(-651.8768f, -144.1688f, 952.811f), 
                                              new Vector3(-636.7765f, -157.8604f, 1047.953f), new Vector3(-620.3502f, -181.8268f, 1129.717f), new Vector3(-602.4982f, -214.349f, 1197.526f), 
                                              new Vector3(-583.1214f, -253.7078f, 1250.801f), new Vector3(-562.1201f, -298.1837f, 1288.967f), new Vector3(-539.3951f, -346.0575f, 1311.446f), 
                                              new Vector3(-514.8466f, -395.61f, 1317.662f), new Vector3(-488.3755f, -445.1217f, 1307.036f), new Vector3(-459.8821f, -492.8735f, 1278.991f), 
                                              new Vector3(-429.267f, -537.1461f, 1232.952f), new Vector3(-396.4309f, -576.2202f, 1168.34f), new Vector3(-361.274f, -608.3765f, 1084.578f), 
                                              new Vector3(-323.6972f, -631.8957f, 981.089f), new Vector3(-283.601f, -645.0583f, 857.2966f), new Vector3(-240.8856f, -646.1454f, 712.623f), 
                                              new Vector3(-195.452f, -633.4376f, 546.4915f), new Vector3(-147.2006f, -605.2153f, 358.3246f), new Vector3(-96.03168f, -559.7596f, 147.5455f), 
                                              new Vector3(-41.84613f, -495.3511f, -86.42322f), new Vector3(15.45569f, -410.2704f, -344.1586f), new Vector3(-632.6671f, -220.7711f, 450f), 
                                              new Vector3(-619.0291f, -183.6865f, 599.8872f), new Vector3(-604.2179f, -161.8362f, 738.1619f), new Vector3(-588.108f, -153.7258f, 864.2188f), 
                                              new Vector3(-570.5733f, -157.8604f, 977.4525f), new Vector3(-551.4885f, -172.7453f, 1077.257f), new Vector3(-530.7278f, -196.8858f, 1163.028f), 
                                              new Vector3(-508.1653f, -228.7872f, 1234.16f), new Vector3(-483.6756f, -266.9548f, 1290.047f), new Vector3(-457.1329f, -309.8938f, 1330.083f), 
                                              new Vector3(-428.4114f, -356.1095f, 1353.664f), new Vector3(-397.3854f, -404.1073f, 1360.183f), new Vector3(-363.9294f, -452.3924f, 1349.037f), 
                                              new Vector3(-327.9175f, -499.47f, 1319.618f), new Vector3(-289.2241f, -543.8455f, 1271.322f), new Vector3(-247.7236f, -584.0241f, 1203.543f), 
                                              new Vector3(-203.2901f, -618.5112f, 1115.677f), new Vector3(-155.798f, -645.812f, 1007.116f), new Vector3(-105.1216f, -664.4316f, 877.2571f), 
                                              new Vector3(-51.13519f, -672.8756f, 725.4936f), new Vector3(6.286865f, -669.6492f, 551.2203f), new Vector3(67.27039f, -653.2574f, 353.8318f), 
                                              new Vector3(131.9409f, -622.2059f, 132.7229f), new Vector3(200.4244f, -574.9996f, -112.712f), new Vector3(272.8461f, -510.144f, -383.0782f), 
                                              new Vector3(-562.3168f, -225.6388f, 450f), new Vector3(-545.7477f, -196.6118f, 607.5045f), new Vector3(-527.7532f, -180.4565f, 752.8064f), 
                                              new Vector3(-508.1809f, -175.9393f, 885.2697f), new Vector3(-486.8777f, -181.8268f, 1004.258f), new Vector3(-463.6913f, -196.8858f, 1109.135f), 
                                              new Vector3(-438.4687f, -219.8827f, 1199.265f), new Vector3(-411.0571f, -249.5841f, 1274.011f), new Vector3(-381.3041f, -284.7567f, 1332.738f), 
                                              new Vector3(-349.0566f, -324.1669f, 1374.809f), new Vector3(-314.1625f, -366.5814f, 1399.588f), new Vector3(-276.4684f, -410.7669f, 1406.439f), 
                                              new Vector3(-235.822f, -455.4897f, 1394.726f), new Vector3(-192.0705f, -499.5166f, 1363.812f), new Vector3(-145.0612f, -541.6143f, 1313.062f), 
                                              new Vector3(-94.64124f, -580.5492f, 1241.839f), new Vector3(-40.6582f, -615.0879f, 1149.507f), new Vector3(17.04108f, -643.9969f, 1035.429f), 
                                              new Vector3(78.60876f, -666.0431f, 898.9705f), new Vector3(144.1979f, -679.9927f, 739.4943f), new Vector3(213.9612f, -684.6125f, 556.3643f), 
                                              new Vector3(288.0511f, -678.6691f, 348.9445f), new Vector3(366.6208f, -660.9291f, 116.5988f), new Vector3(449.8228f, -630.1589f, -141.3093f), 
                                              new Vector3(537.8093f, -585.1252f, -425.4157f), new Vector3(-489.6687f, -238.9407f, 450f), new Vector3(-470.0728f, -218.5656f, 615.7829f), 
                                              new Vector3(-448.7913f, -208.3005f, 768.7218f), new Vector3(-425.6436f, -207.2076f, 908.1472f), new Vector3(-400.4487f, -214.349f, 1033.389f), 
                                              new Vector3(-373.0266f, -228.7872f, 1143.779f), new Vector3(-343.1962f, -249.5841f, 1238.646f), new Vector3(-310.7773f, -275.802f, 1317.321f), 
                                              new Vector3(-275.589f, -306.5031f, 1379.135f), new Vector3(-237.4507f, -340.7496f, 1423.417f), new Vector3(-196.1822f, -377.6038f, 1449.498f), 
                                              new Vector3(-151.6022f, -416.1277f, 1456.709f), new Vector3(-103.5305f, -455.3836f, 1444.381f), new Vector3(-51.78662f, -494.4338f, 1411.842f), 
                                              new Vector3(3.810425f, -532.3405f, 1358.424f), new Vector3(63.44092f, -568.1658f, 1283.458f), new Vector3(127.2856f, -600.9718f, 1186.272f), 
                                              new Vector3(195.525f, -629.8209f, 1066.199f), new Vector3(268.3398f, -653.7752f, 922.5681f), new Vector3(345.9108f, -671.897f, 754.71f), 
                                              new Vector3(428.4182f, -683.2484f, 561.9548f), new Vector3(516.0427f, -686.8915f, 343.6331f), new Vector3(608.9652f, -681.8887f, 99.07532f), 
                                              new Vector3(707.3661f, -667.3021f, -172.3883f), new Vector3(811.4263f, -642.194f, -471.4273f), new Vector3(-414.436f, -258.4754f, 450f), 
                                              new Vector3(-391.7057f, -247.3996f, 624.7684f), new Vector3(-367.02f, -243.3199f, 785.9968f), new Vector3(-340.1696f, -245.6261f, 932.9791f), 
                                              new Vector3(-310.9448f, -253.7078f, 1065.01f), new Vector3(-279.1362f, -266.9548f, 1181.382f), new Vector3(-244.5344f, -284.7567f, 1281.391f), 
                                              new Vector3(-206.9297f, -306.5031f, 1364.331f), new Vector3(-166.1128f, -331.5838f, 1429.494f), new Vector3(-121.8741f, -359.3886f, 1476.177f), 
                                              new Vector3(-74.00427f, -389.3071f, 1503.672f), new Vector3(-22.29352f, -420.7289f, 1511.274f), new Vector3(33.46759f, -453.0438f, 1498.277f), 
                                              new Vector3(93.48828f, -485.6415f, 1463.974f), new Vector3(157.9784f, -517.9116f, 1407.661f), new Vector3(227.1472f, -549.244f, 1328.632f), 
                                              new Vector3(301.2041f, -579.0281f, 1226.179f), new Vector3(380.359f, -606.6538f, 1099.598f), new Vector3(464.8212f, -631.5105f, 948.1818f), 
                                              new Vector3(554.8f, -652.9883f, 771.2255f), new Vector3(650.505f, -670.4767f, 568.0228f), new Vector3(752.1458f, -683.3653f, 337.8679f), 
                                              new Vector3(859.9318f, -691.0439f, 80.05496f), new Vector3(974.0726f, -692.9023f, -206.1222f), new Vector3(1094.778f, -688.3298f, -521.3693f), 
                                              new Vector3(-336.3317f, -282.0414f, 450f), new Vector3(-310.3472f, -280.9655f, 634.5073f), new Vector3(-282.1275f, -283.4662f, 804.7198f), 
                                              new Vector3(-251.433f, -289.2901f, 959.8927f), new Vector3(-218.0244f, -298.1837f, 1099.28f), new Vector3(-181.662f, -309.8937f, 1222.138f), 
                                              new Vector3(-142.1065f, -324.1669f, 1327.719f), new Vector3(-99.11841f, -340.7496f, 1415.281f), new Vector3(-52.45789f, -359.3886f, 1484.076f), 
                                              new Vector3(-1.885864f, -379.8306f, 1533.359f), new Vector3(52.8371f, -401.822f, 1562.387f), new Vector3(111.9509f, -425.1097f, 1570.412f), 
                                              new Vector3(175.6948f, -449.44f, 1556.691f), new Vector3(244.3083f, -474.5598f, 1520.477f), new Vector3(318.0309f, -500.2157f, 1461.026f), 
                                              new Vector3(397.1021f, -526.1542f, 1377.593f), new Vector3(481.7614f, -552.122f, 1269.431f), new Vector3(572.248f, -577.8657f, 1135.796f), 
                                              new Vector3(668.8021f, -603.1319f, 975.9424f), new Vector3(771.6625f, -627.6672f, 789.1255f), new Vector3(881.0687f, -651.2183f, 574.5996f), 
                                              new Vector3(997.2607f, -673.5317f, 331.6195f), new Vector3(1120.478f, -694.3542f, 59.44006f), new Vector3(1250.959f, -713.4325f, -242.684f), 
                                              new Vector3(1388.945f, -730.5129f, -575.498f), new Vector3(-255.0688f, -307.4372f, 450f), new Vector3(-225.6985f, -317.1153f, 645.0454f), 
                                              new Vector3(-193.8018f, -326.691f, 824.9799f), new Vector3(-159.108f, -336.2949f, 989.0154f), new Vector3(-121.3462f, -346.0575f, 1136.364f), 
                                              new Vector3(-80.24585f, -356.1096f, 1266.239f), new Vector3(-35.53644f, -366.5815f, 1377.851f), new Vector3(13.0531f, -377.6037f, 1470.413f), 
                                              new Vector3(65.79321f, -389.3071f, 1543.137f), new Vector3(122.9547f, -401.8221f, 1595.236f), new Vector3(184.808f, -415.2792f, 1625.921f), 
                                              new Vector3(251.6244f, -429.809f, 1634.405f), new Vector3(323.674f, -445.5421f, 1619.9f), new Vector3(401.2275f, -462.6091f, 1581.618f), 
                                              new Vector3(484.556f, -481.1404f, 1518.771f), new Vector3(573.9302f, -501.2668f, 1430.572f), new Vector3(669.6201f, -523.1188f, 1316.233f), 
                                              new Vector3(771.8975f, -546.8269f, 1174.965f), new Vector3(881.0321f, -572.5217f, 1005.982f), new Vector3(997.2953f, -600.3337f, 808.4948f), 
                                              new Vector3(1120.957f, -630.3936f, 581.7161f), new Vector3(1252.289f, -662.8319f, 324.8581f), new Vector3(1391.561f, -697.7792f, 37.13315f), 
                                              new Vector3(1539.044f, -735.3659f, -282.2469f), new Vector3(1695.008f, -775.7228f, -634.0696f), new Vector3(-170.36f, -332.4612f, 450f), 
                                              new Vector3(-137.4605f, -353.7005f, 656.4292f), new Vector3(-101.7308f, -370.9456f, 846.8654f), new Vector3(-62.86792f, -384.7358f, 1020.475f), 
                                              new Vector3(-20.56848f, -395.61f, 1176.424f), new Vector3(25.47058f, -404.1073f, 1313.878f), new Vector3(75.55273f, -410.7669f, 1432.005f), 
                                              new Vector3(129.9811f, -416.1277f, 1529.969f), new Vector3(189.0587f, -420.7289f, 1606.938f), new Vector3(253.0891f, -425.1096f, 1662.077f), 
                                              new Vector3(322.375f, -429.809f, 1694.553f), new Vector3(397.2205f, -435.3659f, 1703.533f), new Vector3(477.9279f, -442.3196f, 1688.181f), 
                                              new Vector3(564.8009f, -451.2092f, 1647.664f), new Vector3(658.1428f, -462.5737f, 1581.15f), new Vector3(758.2566f, -476.9522f, 1487.803f), 
                                              new Vector3(865.4453f, -494.8838f, 1366.79f), new Vector3(980.0127f, -516.9076f, 1217.278f), new Vector3(1102.262f, -543.5627f, 1038.431f), 
                                              new Vector3(1232.496f, -575.3883f, 829.4182f), new Vector3(1371.018f, -612.9233f, 589.4037f), new Vector3(1518.13f, -656.7067f, 317.5542f), 
                                              new Vector3(1674.138f, -707.278f, 13.03625f), new Vector3(1839.344f, -765.1759f, -324.9842f), new Vector3(2014.05f, -830.9396f, -697.3408f), 
                                              new Vector3(-81.91852f, -354.9118f, 450f), new Vector3(-45.33423f, -388.573f, 668.7046f), new Vector3(-5.602783f, -414.1818f, 870.4651f), 
                                              new Vector3(37.61285f, -432.7081f, 1054.398f), new Vector3(84.6499f, -445.1217f, 1219.621f), new Vector3(135.8456f, -452.3924f, 1365.249f), 
                                              new Vector3(191.537f, -455.4897f, 1490.4f), new Vector3(252.0615f, -455.3836f, 1594.19f), new Vector3(317.7561f, -453.0438f, 1675.736f), 
                                              new Vector3(388.9578f, -449.44f, 1734.154f), new Vector3(466.0039f, -445.5421f, 1768.561f), new Vector3(549.2321f, -442.3196f, 1778.074f), 
                                              new Vector3(638.9791f, -440.7425f, 1761.81f), new Vector3(735.582f, -441.7805f, 1718.884f), new Vector3(839.3785f, -446.4033f, 1648.414f), 
                                              new Vector3(950.7053f, -455.5806f, 1549.516f), new Vector3(1069.899f, -470.2822f, 1421.307f), new Vector3(1197.299f, -491.478f, 1262.904f), 
                                              new Vector3(1333.24f, -520.1377f, 1073.423f), new Vector3(1478.06f, -557.231f, 851.9805f), new Vector3(1632.097f, -603.7275f, 597.6934f), 
                                              new Vector3(1795.687f, -660.5974f, 309.6783f), new Vector3(1969.168f, -728.8099f, -12.94794f), new Vector3(2152.877f, -809.3352f, -371.0689f), 
                                              new Vector3(2347.15f, -903.1429f, -765.5679f), new Vector3(10.5426f, -372.5878f, 450f), new Vector3(50.97919f, -419.5845f, 681.9177f), 
                                              new Vector3(94.89441f, -454.3509f, 895.8677f), new Vector3(142.6605f, -478.3073f, 1090.913f), new Vector3(194.6506f, -492.8735f, 1266.118f), 
                                              new Vector3(251.2371f, -499.47f, 1420.544f), new Vector3(312.7927f, -499.5167f, 1553.256f), new Vector3(379.6903f, -494.4338f, 1663.316f), 
                                              new Vector3(452.3025f, -485.6415f, 1749.789f), new Vector3(531.002f, -474.5598f, 1811.736f), new Vector3(616.1609f, -462.6091f, 1848.222f), 
                                              new Vector3(708.153f, -451.2092f, 1858.31f), new Vector3(807.3502f, -441.7805f, 1841.063f), new Vector3(914.125f, -435.743f, 1795.544f), 
                                              new Vector3(1028.851f, -434.5169f, 1720.817f), new Vector3(1151.901f, -439.5222f, 1615.944f), new Vector3(1283.646f, -452.1794f, 1479.989f), 
                                              new Vector3(1424.46f, -473.9081f, 1312.016f), new Vector3(1574.716f, -506.1291f, 1111.087f), new Vector3(1734.786f, -550.262f, 876.2661f), 
                                              new Vector3(1905.042f, -607.7271f, 606.6163f), new Vector3(2085.858f, -679.9447f, 301.2007f), new Vector3(2277.606f, -768.3347f, -40.91705f), 
                                              new Vector3(2480.66f, -874.3173f, -420.674f), new Vector3(2695.39f, -999.3129f, -839.0068f), new Vector3(107.3107f, -383.2874f, 450f), 
                                              new Vector3(151.7789f, -444.5869f, 696.1147f), new Vector3(200.0726f, -489.4046f, 923.1617f), new Vector3(252.6014f, -519.6285f, 1130.147f), 
                                              new Vector3(309.7753f, -537.1461f, 1316.077f), new Vector3(372.0037f, -543.8455f, 1479.957f), new Vector3(439.6968f, -541.6143f, 1620.792f), 
                                              new Vector3(513.2643f, -532.3405f, 1737.59f), new Vector3(593.1163f, -517.9116f, 1829.357f), new Vector3(679.6622f, -500.2157f, 1895.096f), 
                                              new Vector3(773.3121f, -481.1405f, 1933.815f), new Vector3(874.4763f, -462.5737f, 1944.521f), new Vector3(983.564f, -446.4033f, 1926.218f), 
                                              new Vector3(1100.985f, -434.5168f, 1877.913f), new Vector3(1227.15f, -428.8024f, 1798.611f), new Vector3(1362.468f, -431.1476f, 1687.318f), 
                                              new Vector3(1507.349f, -443.4403f, 1543.041f), new Vector3(1662.203f, -467.5683f, 1364.785f), new Vector3(1827.44f, -505.4195f, 1151.556f), 
                                              new Vector3(2003.469f, -558.8816f, 902.3604f), new Vector3(2190.701f, -629.8425f, 616.2037f), new Vector3(2389.545f, -720.1898f, 292.0919f), 
                                              new Vector3(2600.412f, -831.8114f, -70.96887f), new Vector3(2823.711f, -966.5953f, -473.9731f), new Vector3(3059.852f, -1126.429f, -917.9146f), 
                                              new Vector3(208.6725f, -384.8093f, 450f), new Vector3(257.364f, -461.4319f, 711.3417f), new Vector3(310.2441f, -517.2945f, 952.4361f), 
                                              new Vector3(367.7614f, -554.7671f, 1172.228f), new Vector3(430.3651f, -576.2203f, 1369.661f), new Vector3(498.5032f, -584.0242f, 1543.68f), 
                                              new Vector3(572.6251f, -580.5492f, 1693.229f), new Vector3(653.1793f, -568.1657f, 1817.253f), new Vector3(740.6149f, -549.244f, 1914.697f), 
                                              new Vector3(835.38f, -526.1542f, 1984.504f), new Vector3(937.9237f, -501.2668f, 2025.618f), new Vector3(1048.695f, -476.9522f, 2036.987f), 
                                              new Vector3(1168.143f, -455.5806f, 2017.551f), new Vector3(1296.716f, -439.5222f, 1966.257f), new Vector3(1434.862f, -431.1476f, 1882.049f), 
                                              new Vector3(1583.031f, -432.8267f, 1763.871f), new Vector3(1741.671f, -446.9304f, 1610.667f), new Vector3(1911.232f, -475.8285f, 1421.382f), 
                                              new Vector3(2092.161f, -521.8916f, 1194.961f), new Vector3(2284.908f, -587.4899f, 930.3478f), new Vector3(2489.921f, -674.9938f, 626.4867f), 
                                              new Vector3(2707.65f, -786.7737f, 282.3222f), new Vector3(2938.542f, -925.1996f, -103.201f), new Vector3(3183.048f, -1092.642f, -531.1388f), 
                                              new Vector3(3441.614f, -1291.472f, -1002.547f), new Vector3(314.9149f, -374.9518f, 450f), new Vector3(368.0328f, -467.9713f, 727.6448f), 
                                              new Vector3(425.7205f, -535.9717f, 983.7792f), new Vector3(488.4664f, -581.8184f, 1217.282f), new Vector3(556.7612f, -608.3765f, 1427.031f), 
                                              new Vector3(631.0938f, -618.5112f, 1611.906f), new Vector3(711.9537f, -615.0878f, 1770.785f), new Vector3(799.8314f, -600.9718f, 1902.546f), 
                                              new Vector3(895.2156f, -579.0281f, 2006.068f), new Vector3(998.5957f, -552.122f, 2080.229f), new Vector3(1110.461f, -523.1188f, 2123.909f), 
                                              new Vector3(1231.303f, -494.8838f, 2135.986f), new Vector3(1361.61f, -470.2823f, 2115.339f), new Vector3(1501.871f, -452.1794f, 2060.845f), 
                                              new Vector3(1652.576f, -443.4403f, 1971.383f), new Vector3(1814.215f, -446.9305f, 1845.833f), new Vector3(1987.277f, -465.5149f, 1683.072f), 
                                              new Vector3(2172.252f, -502.0591f, 1481.979f), new Vector3(2369.629f, -559.4282f, 1241.433f), new Vector3(2579.898f, -640.4875f, 960.3129f), 
                                              new Vector3(2803.549f, -748.1023f, 637.4963f), new Vector3(3041.071f, -885.1376f, 271.862f), new Vector3(3292.953f, -1054.459f, -137.7109f), 
                                              new Vector3(3559.687f, -1258.931f, -592.3446f), new Vector3(3841.76f, -1501.42f, -1093.16f), new Vector3(426.3254f, -351.5135f, 450f), 
                                              new Vector3(484.0851f, -462.0568f, 745.0702f), new Vector3(546.8136f, -543.3882f, 1017.28f), new Vector3(615.043f, -598.8778f, 1265.438f), 
                                              new Vector3(689.3058f, -631.8956f, 1488.351f), new Vector3(770.134f, -645.812f, 1684.828f), new Vector3(858.0602f, -643.997f, 1853.679f), 
                                              new Vector3(953.6171f, -629.8209f, 1993.709f), new Vector3(1057.336f, -606.6537f, 2103.729f), new Vector3(1169.75f, -577.8657f, 2182.545f), 
                                              new Vector3(1291.392f, -546.8269f, 2228.966f), new Vector3(1422.794f, -516.9076f, 2241.801f), new Vector3(1564.487f, -491.478f, 2219.857f), 
                                              new Vector3(1717.005f, -473.9082f, 2161.943f), new Vector3(1880.88f, -467.5683f, 2066.867f), new Vector3(2056.644f, -475.8285f, 1933.437f), 
                                              new Vector3(2244.829f, -502.0591f, 1760.461f), new Vector3(2445.969f, -549.63f, 1546.748f), new Vector3(2660.594f, -621.9119f, 1291.105f), 
                                              new Vector3(2889.238f, -722.2742f, 992.3408f), new Vector3(3132.433f, -854.0877f, 649.2638f), new Vector3(3390.711f, -1020.722f, 260.6819f), 
                                              new Vector3(3664.604f, -1225.548f, -174.5965f), new Vector3(3954.646f, -1471.936f, -657.7634f), new Vector3(4261.368f, -1763.255f, -1190.011f), 
                                              new Vector3(543.1907f, -312.2928f, 450f), new Vector3(605.8193f, -441.5403f, 763.6639f), new Vector3(673.8359f, -537.4953f, 1053.027f), 
                                              new Vector3(747.8169f, -604.0405f, 1316.822f), new Vector3(828.3401f, -645.0583f, 1553.782f), new Vector3(915.9818f, -664.4316f, 1762.641f), 
                                              new Vector3(1011.32f, -666.0431f, 1942.131f), new Vector3(1114.932f, -653.7752f, 2090.985f), new Vector3(1227.395f, -631.5105f, 2207.938f), 
                                              new Vector3(1349.285f, -603.1318f, 2291.72f), new Vector3(1481.181f, -572.5217f, 2341.067f), new Vector3(1623.66f, -543.5628f, 2354.71f), 
                                              new Vector3(1777.298f, -520.1377f, 2331.384f), new Vector3(1942.673f, -506.129f, 2269.821f), new Vector3(2120.362f, -505.4195f, 2168.753f), 
                                              new Vector3(2310.943f, -521.8917f, 2026.915f), new Vector3(2514.992f, -559.4282f, 1843.039f), new Vector3(2733.087f, -621.9118f, 1615.859f), 
                                              new Vector3(2965.805f, -713.2252f, 1344.107f), new Vector3(3213.724f, -837.2505f, 1026.516f), new Vector3(3477.419f, -997.8711f, 661.8203f), 
                                              new Vector3(3757.47f, -1198.969f, 248.7521f), new Vector3(4054.452f, -1444.427f, -213.9551f), new Vector3(4368.944f, -1738.129f, -727.5686f), 
                                              new Vector3(4701.522f, -2083.955f, -1293.355f), new Vector3(665.7977f, -255.0883f, 450f), new Vector3(733.5349f, -404.2734f, 783.472f), 
                                              new Vector3(807.0991f, -516.2445f, 1091.109f), new Vector3(887.1143f, -595.4019f, 1371.563f), new Vector3(974.2052f, -646.1454f, 1623.487f), 
                                              new Vector3(1068.996f, -672.8757f, 1845.536f), new Vector3(1172.11f, -679.9928f, 2036.36f), new Vector3(1284.173f, -671.897f, 2194.615f), 
                                              new Vector3(1405.809f, -652.9884f, 2318.953f), new Vector3(1537.642f, -627.6672f, 2408.027f), new Vector3(1680.295f, -600.3337f, 2460.489f), 
                                              new Vector3(1834.395f, -575.3883f, 2474.995f), new Vector3(2000.564f, -557.231f, 2450.195f), new Vector3(2179.428f, -550.262f, 2384.744f), 
                                              new Vector3(2371.611f, -558.8816f, 2277.294f), new Vector3(2577.736f, -587.4899f, 2126.499f), new Vector3(2798.428f, -640.4874f, 1931.011f), 
                                              new Vector3(3034.312f, -722.2742f, 1689.484f), new Vector3(3286.012f, -837.2506f, 1400.571f), new Vector3(3554.151f, -989.8167f, 1062.924f), 
                                              new Vector3(3839.355f, -1184.373f, 675.197f), new Vector3(4142.248f, -1425.319f, 236.0432f), new Vector3(4463.454f, -1717.056f, -255.8846f), 
                                              new Vector3(4803.598f, -2063.983f, -801.9333f), new Vector3(5163.302f, -2470.501f, -1403.45f), new Vector3(794.4337f, -177.6983f, 450f), 
                                              new Vector3(867.5303f, -348.108f, 804.5408f), new Vector3(946.915f, -477.5874f, 1131.614f), new Vector3(1033.261f, -571.0571f, 1429.787f), 
                                              new Vector3(1127.243f, -633.4376f, 1697.628f), new Vector3(1229.533f, -669.6492f, 1933.705f), new Vector3(1340.806f, -684.6125f, 2136.586f), 
                                              new Vector3(1461.736f, -683.2484f, 2304.84f), new Vector3(1592.996f, -670.4767f, 2437.034f), new Vector3(1735.259f, -651.2183f, 2531.735f), 
                                              new Vector3(1889.2f, -630.3936f, 2587.512f), new Vector3(2055.492f, -612.9232f, 2602.934f), new Vector3(2234.81f, -603.7275f, 2576.568f), 
                                              new Vector3(2427.825f, -607.7272f, 2506.981f), new Vector3(2635.214f, -629.8425f, 2392.743f), new Vector3(2857.648f, -674.9938f, 2232.42f), 
                                              new Vector3(3095.801f, -748.1022f, 2024.581f), new Vector3(3350.349f, -854.0876f, 1767.795f), new Vector3(3621.964f, -997.8712f, 1460.627f), 
                                              new Vector3(3911.319f, -1184.373f, 1101.648f), new Vector3(4219.089f, -1418.513f, 689.4248f), new Vector3(4545.947f, -1705.213f, 222.5253f), 
                                              new Vector3(4892.567f, -2049.392f, -300.4824f), new Vector3(5259.624f, -2455.972f, -881.0305f), new Vector3(5647.789f, -2929.873f, -1520.551f), 
                                              new Vector3(929.3855f, -77.92139f, 450f), new Vector3(1008.105f, -270.8958f, 826.9163f), new Vector3(1093.595f, -419.4755f, 1174.631f), 
                                              new Vector3(1186.584f, -529.1018f, 1491.622f), new Vector3(1287.794f, -605.2153f, 1776.367f), new Vector3(1397.953f, -653.2574f, 2027.344f), 
                                              new Vector3(1517.785f, -678.6691f, 2243.029f), new Vector3(1648.017f, -686.8915f, 2421.901f), new Vector3(1789.373f, -683.3653f, 2562.437f), 
                                              new Vector3(1942.58f, -673.5318f, 2663.116f), new Vector3(2108.362f, -662.8319f, 2722.413f), new Vector3(2287.445f, -656.7067f, 2738.808f), 
                                              new Vector3(2480.556f, -660.5974f, 2710.778f), new Vector3(2688.418f, -679.9446f, 2636.799f), new Vector3(2911.759f, -720.1898f, 2515.351f), 
                                              new Vector3(3151.303f, -786.7738f, 2344.911f), new Vector3(3407.775f, -885.1376f, 2123.955f), new Vector3(3681.903f, -1020.722f, 1850.962f), 
                                              new Vector3(3974.41f, -1198.969f, 1524.409f), new Vector3(4286.023f, -1425.319f, 1142.775f), new Vector3(4617.467f, -1705.213f, 704.5354f), 
                                              new Vector3(4969.467f, -2044.092f, 208.1691f), new Vector3(5342.749f, -2447.397f, -347.8462f), new Vector3(5738.04f, -2920.569f, -965.0332f), 
                                              new Vector3(6156.063f, -3469.05f, -1644.915f), new Vector3(1070.94f, 46.44388f, 450f), new Vector3(1155.557f, -170.4886f, 850.6446f), 
                                              new Vector3(1247.453f, -339.8603f, 1220.249f), new Vector3(1347.408f, -467.6309f, 1557.196f), new Vector3(1456.202f, -559.7596f, 1859.867f), 
                                              new Vector3(1574.613f, -622.2058f, 2126.643f), new Vector3(1703.424f, -660.9291f, 2355.907f), new Vector3(1843.412f, -681.8887f, 2546.04f), 
                                              new Vector3(1995.359f, -691.0439f, 2695.423f), new Vector3(2160.044f, -694.3543f, 2802.44f), new Vector3(2338.246f, -697.7792f, 2865.47f), 
                                              new Vector3(2530.748f, -707.278f, 2882.897f), new Vector3(2738.326f, -728.8099f, 2853.103f), new Vector3(2961.761f, -768.3347f, 2774.467f), 
                                              new Vector3(3201.835f, -831.8114f, 2645.373f), new Vector3(3459.326f, -925.1996f, 2464.202f), new Vector3(3735.014f, -1054.459f, 2229.337f), 
                                              new Vector3(4029.679f, -1225.548f, 1939.158f), new Vector3(4344.102f, -1444.427f, 1592.048f), new Vector3(4679.061f, -1717.056f, 1186.387f), 
                                              new Vector3(5035.337f, -2049.392f, 720.5594f), new Vector3(5413.709f, -2447.397f, 192.9449f), new Vector3(5814.958f, -2917.029f, -398.0735f), 
                                              new Vector3(6239.864f, -3464.248f, -1054.115f), new Vector3(6689.206f, -4095.012f, -1776.797f), new Vector3(1219.385f, 197.5991f, 450f), 
                                              new Vector3(1310.187f, -44.73807f, 875.7719f), new Vector3(1408.8f, -236.6934f, 1268.557f), new Vector3(1516.061f, -384.7401f, 1626.637f), 
                                              new Vector3(1632.806f, -495.3511f, 1948.29f), new Vector3(1759.873f, -574.9996f, 2231.797f), new Vector3(1898.098f, -630.1589f, 2475.44f), 
                                              new Vector3(2048.318f, -667.3021f, 2677.497f), new Vector3(2211.372f, -692.9023f, 2836.25f), new Vector3(2388.093f, -713.4325f, 2949.978f), 
                                              new Vector3(2579.321f, -735.366f, 3016.961f), new Vector3(2785.892f, -765.1758f, 3035.481f), new Vector3(3008.643f, -809.3352f, 3003.818f), 
                                              new Vector3(3248.41f, -874.3174f, 2920.251f), new Vector3(3506.031f, -966.5953f, 2783.061f), new Vector3(3782.342f, -1092.642f, 2590.528f), 
                                              new Vector3(4078.181f, -1258.931f, 2340.932f), new Vector3(4394.383f, -1471.936f, 2032.554f), new Vector3(4731.787f, -1738.129f, 1663.673f), 
                                              new Vector3(5091.229f, -2063.983f, 1232.571f), new Vector3(5473.546f, -2455.972f, 737.528f), new Vector3(5879.574f, -2920.569f, 176.8232f), 
                                              new Vector3(6310.151f, -3464.248f, -451.2623f), new Vector3(6766.114f, -4093.48f, -1148.449f), new Vector3(7248.299f, -4814.74f, -1916.456f), 
                                              new Vector3(1375.007f, 377.7458f, 450f), new Vector3(1472.292f, 108.5038f, 902.3442f), new Vector3(1577.947f, -107.9262f, 1319.643f), 
                                              new Vector3(1692.866f, -278.5244f, 1700.07f), new Vector3(1817.948f, -410.2704f, 2041.798f), new Vector3(1954.088f, -510.144f, 2342.999f), 
                                              new Vector3(2102.184f, -585.1252f, 2601.847f), new Vector3(2263.131f, -642.194f, 2816.515f), new Vector3(2437.827f, -688.3298f, 2985.175f), 
                                              new Vector3(2627.168f, -730.5129f, 3106.001f), new Vector3(2832.05f, -775.7228f, 3177.165f), new Vector3(3053.372f, -830.9396f, 3196.841f), 
                                              new Vector3(3292.028f, -903.1429f, 3163.201f), new Vector3(3548.916f, -999.3129f, 3074.418f), new Vector3(3824.933f, -1126.429f, 2928.667f), 
                                              new Vector3(4120.975f, -1291.472f, 2724.117f), new Vector3(4437.938f, -1501.42f, 2458.944f), new Vector3(4776.719f, -1763.255f, 2131.32f), 
                                              new Vector3(5138.216f, -2083.955f, 1739.418f), new Vector3(5523.324f, -2470.501f, 1281.411f), new Vector3(5932.941f, -2929.873f, 755.4725f), 
                                              new Vector3(6367.962f, -3469.05f, 159.7743f), new Vector3(6829.285f, -4095.012f, -507.51f), new Vector3(7317.807f, -4814.74f, -1248.208f), 
                                              new Vector3(7834.423f, -5635.212f, -2064.146f) };

        static Vector2[] meshTextures = new Vector2[] { new Vector2(0f, 0f), new Vector2(0f, 0.04f), new Vector2(0f, 0.08f), new Vector2(0f, 0.12f), new Vector2(0f, 0.16f), new Vector2(0f, 0.2f), 
                                             new Vector2(0f, 0.24f), new Vector2(0f, 0.28f), new Vector2(0f, 0.32f), new Vector2(0f, 0.36f), new Vector2(0f, 0.4f), new Vector2(0f, 0.44f), 
                                             new Vector2(0f, 0.48f), new Vector2(0f, 0.52f), new Vector2(0f, 0.56f), new Vector2(0f, 0.6f), new Vector2(0f, 0.64f), new Vector2(0f, 0.68f), 
                                             new Vector2(0f, 0.72f), new Vector2(0f, 0.76f), new Vector2(0f, 0.8f), new Vector2(0f, 0.84f), new Vector2(0f, 0.88f), new Vector2(0f, 0.92f), 
                                             new Vector2(0f, 0.96f), new Vector2(0.04f, 0f), new Vector2(0.04f, 0.04f), new Vector2(0.04f, 0.08f), new Vector2(0.04f, 0.12f), new Vector2(0.04f, 0.16f), 
                                             new Vector2(0.04f, 0.2f), new Vector2(0.04f, 0.24f), new Vector2(0.04f, 0.28f), new Vector2(0.04f, 0.32f), new Vector2(0.04f, 0.36f), new Vector2(0.04f, 0.4f), 
                                             new Vector2(0.04f, 0.44f), new Vector2(0.04f, 0.48f), new Vector2(0.04f, 0.52f), new Vector2(0.04f, 0.56f), new Vector2(0.04f, 0.6f), new Vector2(0.04f, 0.64f), 
                                             new Vector2(0.04f, 0.68f), new Vector2(0.04f, 0.72f), new Vector2(0.04f, 0.76f), new Vector2(0.04f, 0.8f), new Vector2(0.04f, 0.84f), new Vector2(0.04f, 0.88f), 
                                             new Vector2(0.04f, 0.92f), new Vector2(0.04f, 0.96f), new Vector2(0.08f, 0f), new Vector2(0.08f, 0.04f), new Vector2(0.08f, 0.08f), new Vector2(0.08f, 0.12f), 
                                             new Vector2(0.08f, 0.16f), new Vector2(0.08f, 0.2f), new Vector2(0.08f, 0.24f), new Vector2(0.08f, 0.28f), new Vector2(0.08f, 0.32f), new Vector2(0.08f, 0.36f), 
                                             new Vector2(0.08f, 0.4f), new Vector2(0.08f, 0.44f), new Vector2(0.08f, 0.48f), new Vector2(0.08f, 0.52f), new Vector2(0.08f, 0.56f), new Vector2(0.08f, 0.6f), 
                                             new Vector2(0.08f, 0.64f), new Vector2(0.08f, 0.68f), new Vector2(0.08f, 0.72f), new Vector2(0.08f, 0.76f), new Vector2(0.08f, 0.8f), new Vector2(0.08f, 0.84f), 
                                             new Vector2(0.08f, 0.88f), new Vector2(0.08f, 0.92f), new Vector2(0.08f, 0.96f), new Vector2(0.12f, 0f), new Vector2(0.12f, 0.04f), new Vector2(0.12f, 0.08f), 
                                             new Vector2(0.12f, 0.12f), new Vector2(0.12f, 0.16f), new Vector2(0.12f, 0.2f), new Vector2(0.12f, 0.24f), new Vector2(0.12f, 0.28f), new Vector2(0.12f, 0.32f), 
                                             new Vector2(0.12f, 0.36f), new Vector2(0.12f, 0.4f), new Vector2(0.12f, 0.44f), new Vector2(0.12f, 0.48f), new Vector2(0.12f, 0.52f), new Vector2(0.12f, 0.56f), 
                                             new Vector2(0.12f, 0.6f), new Vector2(0.12f, 0.64f), new Vector2(0.12f, 0.68f), new Vector2(0.12f, 0.72f), new Vector2(0.12f, 0.76f), new Vector2(0.12f, 0.8f), 
                                             new Vector2(0.12f, 0.84f), new Vector2(0.12f, 0.88f), new Vector2(0.12f, 0.92f), new Vector2(0.12f, 0.96f), new Vector2(0.16f, 0f), new Vector2(0.16f, 0.04f), 
                                             new Vector2(0.16f, 0.08f), new Vector2(0.16f, 0.12f), new Vector2(0.16f, 0.16f), new Vector2(0.16f, 0.2f), new Vector2(0.16f, 0.24f), new Vector2(0.16f, 0.28f), 
                                             new Vector2(0.16f, 0.32f), new Vector2(0.16f, 0.36f), new Vector2(0.16f, 0.4f), new Vector2(0.16f, 0.44f), new Vector2(0.16f, 0.48f), new Vector2(0.16f, 0.52f), 
                                             new Vector2(0.16f, 0.56f), new Vector2(0.16f, 0.6f), new Vector2(0.16f, 0.64f), new Vector2(0.16f, 0.68f), new Vector2(0.16f, 0.72f), new Vector2(0.16f, 0.76f), 
                                             new Vector2(0.16f, 0.8f), new Vector2(0.16f, 0.84f), new Vector2(0.16f, 0.88f), new Vector2(0.16f, 0.92f), new Vector2(0.16f, 0.96f), new Vector2(0.2f, 0f), 
                                             new Vector2(0.2f, 0.04f), new Vector2(0.2f, 0.08f), new Vector2(0.2f, 0.12f), new Vector2(0.2f, 0.16f), new Vector2(0.2f, 0.2f), new Vector2(0.2f, 0.24f), 
                                             new Vector2(0.2f, 0.28f), new Vector2(0.2f, 0.32f), new Vector2(0.2f, 0.36f), new Vector2(0.2f, 0.4f), new Vector2(0.2f, 0.44f), new Vector2(0.2f, 0.48f), 
                                             new Vector2(0.2f, 0.52f), new Vector2(0.2f, 0.56f), new Vector2(0.2f, 0.6f), new Vector2(0.2f, 0.64f), new Vector2(0.2f, 0.68f), new Vector2(0.2f, 0.72f), 
                                             new Vector2(0.2f, 0.76f), new Vector2(0.2f, 0.8f), new Vector2(0.2f, 0.84f), new Vector2(0.2f, 0.88f), new Vector2(0.2f, 0.92f), new Vector2(0.2f, 0.96f), 
                                             new Vector2(0.24f, 0f), new Vector2(0.24f, 0.04f), new Vector2(0.24f, 0.08f), new Vector2(0.24f, 0.12f), new Vector2(0.24f, 0.16f), new Vector2(0.24f, 0.2f), 
                                             new Vector2(0.24f, 0.24f), new Vector2(0.24f, 0.28f), new Vector2(0.24f, 0.32f), new Vector2(0.24f, 0.36f), new Vector2(0.24f, 0.4f), new Vector2(0.24f, 0.44f), 
                                             new Vector2(0.24f, 0.48f), new Vector2(0.24f, 0.52f), new Vector2(0.24f, 0.56f), new Vector2(0.24f, 0.6f), new Vector2(0.24f, 0.64f), new Vector2(0.24f, 0.68f), 
                                             new Vector2(0.24f, 0.72f), new Vector2(0.24f, 0.76f), new Vector2(0.24f, 0.8f), new Vector2(0.24f, 0.84f), new Vector2(0.24f, 0.88f), new Vector2(0.24f, 0.92f), 
                                             new Vector2(0.24f, 0.96f), new Vector2(0.28f, 0f), new Vector2(0.28f, 0.04f), new Vector2(0.28f, 0.08f), new Vector2(0.28f, 0.12f), new Vector2(0.28f, 0.16f), 
                                             new Vector2(0.28f, 0.2f), new Vector2(0.28f, 0.24f), new Vector2(0.28f, 0.28f), new Vector2(0.28f, 0.32f), new Vector2(0.28f, 0.36f), new Vector2(0.28f, 0.4f), 
                                             new Vector2(0.28f, 0.44f), new Vector2(0.28f, 0.48f), new Vector2(0.28f, 0.52f), new Vector2(0.28f, 0.56f), new Vector2(0.28f, 0.6f), new Vector2(0.28f, 0.64f), 
                                             new Vector2(0.28f, 0.68f), new Vector2(0.28f, 0.72f), new Vector2(0.28f, 0.76f), new Vector2(0.28f, 0.8f), new Vector2(0.28f, 0.84f), new Vector2(0.28f, 0.88f), 
                                             new Vector2(0.28f, 0.92f), new Vector2(0.28f, 0.96f), new Vector2(0.32f, 0f), new Vector2(0.32f, 0.04f), new Vector2(0.32f, 0.08f), new Vector2(0.32f, 0.12f), 
                                             new Vector2(0.32f, 0.16f), new Vector2(0.32f, 0.2f), new Vector2(0.32f, 0.24f), new Vector2(0.32f, 0.28f), new Vector2(0.32f, 0.32f), new Vector2(0.32f, 0.36f), 
                                             new Vector2(0.32f, 0.4f), new Vector2(0.32f, 0.44f), new Vector2(0.32f, 0.48f), new Vector2(0.32f, 0.52f), new Vector2(0.32f, 0.56f), new Vector2(0.32f, 0.6f), 
                                             new Vector2(0.32f, 0.64f), new Vector2(0.32f, 0.68f), new Vector2(0.32f, 0.72f), new Vector2(0.32f, 0.76f), new Vector2(0.32f, 0.8f), new Vector2(0.32f, 0.84f), 
                                             new Vector2(0.32f, 0.88f), new Vector2(0.32f, 0.92f), new Vector2(0.32f, 0.96f), new Vector2(0.36f, 0f), new Vector2(0.36f, 0.04f), new Vector2(0.36f, 0.08f), 
                                             new Vector2(0.36f, 0.12f), new Vector2(0.36f, 0.16f), new Vector2(0.36f, 0.2f), new Vector2(0.36f, 0.24f), new Vector2(0.36f, 0.28f), new Vector2(0.36f, 0.32f), 
                                             new Vector2(0.36f, 0.36f), new Vector2(0.36f, 0.4f), new Vector2(0.36f, 0.44f), new Vector2(0.36f, 0.48f), new Vector2(0.36f, 0.52f), new Vector2(0.36f, 0.56f), 
                                             new Vector2(0.36f, 0.6f), new Vector2(0.36f, 0.64f), new Vector2(0.36f, 0.68f), new Vector2(0.36f, 0.72f), new Vector2(0.36f, 0.76f), new Vector2(0.36f, 0.8f), 
                                             new Vector2(0.36f, 0.84f), new Vector2(0.36f, 0.88f), new Vector2(0.36f, 0.92f), new Vector2(0.36f, 0.96f), new Vector2(0.4f, 0f), new Vector2(0.4f, 0.04f), 
                                             new Vector2(0.4f, 0.08f), new Vector2(0.4f, 0.12f), new Vector2(0.4f, 0.16f), new Vector2(0.4f, 0.2f), new Vector2(0.4f, 0.24f), new Vector2(0.4f, 0.28f), 
                                             new Vector2(0.4f, 0.32f), new Vector2(0.4f, 0.36f), new Vector2(0.4f, 0.4f), new Vector2(0.4f, 0.44f), new Vector2(0.4f, 0.48f), new Vector2(0.4f, 0.52f), 
                                             new Vector2(0.4f, 0.56f), new Vector2(0.4f, 0.6f), new Vector2(0.4f, 0.64f), new Vector2(0.4f, 0.68f), new Vector2(0.4f, 0.72f), new Vector2(0.4f, 0.76f), 
                                             new Vector2(0.4f, 0.8f), new Vector2(0.4f, 0.84f), new Vector2(0.4f, 0.88f), new Vector2(0.4f, 0.92f), new Vector2(0.4f, 0.96f), new Vector2(0.44f, 0f), 
                                             new Vector2(0.44f, 0.04f), new Vector2(0.44f, 0.08f), new Vector2(0.44f, 0.12f), new Vector2(0.44f, 0.16f), new Vector2(0.44f, 0.2f), new Vector2(0.44f, 0.24f), 
                                             new Vector2(0.44f, 0.28f), new Vector2(0.44f, 0.32f), new Vector2(0.44f, 0.36f), new Vector2(0.44f, 0.4f), new Vector2(0.44f, 0.44f), new Vector2(0.44f, 0.48f), 
                                             new Vector2(0.44f, 0.52f), new Vector2(0.44f, 0.56f), new Vector2(0.44f, 0.6f), new Vector2(0.44f, 0.64f), new Vector2(0.44f, 0.68f), new Vector2(0.44f, 0.72f), 
                                             new Vector2(0.44f, 0.76f), new Vector2(0.44f, 0.8f), new Vector2(0.44f, 0.84f), new Vector2(0.44f, 0.88f), new Vector2(0.44f, 0.92f), new Vector2(0.44f, 0.96f), 
                                             new Vector2(0.48f, 0f), new Vector2(0.48f, 0.04f), new Vector2(0.48f, 0.08f), new Vector2(0.48f, 0.12f), new Vector2(0.48f, 0.16f), new Vector2(0.48f, 0.2f), 
                                             new Vector2(0.48f, 0.24f), new Vector2(0.48f, 0.28f), new Vector2(0.48f, 0.32f), new Vector2(0.48f, 0.36f), new Vector2(0.48f, 0.4f), new Vector2(0.48f, 0.44f), 
                                             new Vector2(0.48f, 0.48f), new Vector2(0.48f, 0.52f), new Vector2(0.48f, 0.56f), new Vector2(0.48f, 0.6f), new Vector2(0.48f, 0.64f), new Vector2(0.48f, 0.68f), 
                                             new Vector2(0.48f, 0.72f), new Vector2(0.48f, 0.76f), new Vector2(0.48f, 0.8f), new Vector2(0.48f, 0.84f), new Vector2(0.48f, 0.88f), new Vector2(0.48f, 0.92f), 
                                             new Vector2(0.48f, 0.96f), new Vector2(0.52f, 0f), new Vector2(0.52f, 0.04f), new Vector2(0.52f, 0.08f), new Vector2(0.52f, 0.12f), new Vector2(0.52f, 0.16f), 
                                             new Vector2(0.52f, 0.2f), new Vector2(0.52f, 0.24f), new Vector2(0.52f, 0.28f), new Vector2(0.52f, 0.32f), new Vector2(0.52f, 0.36f), new Vector2(0.52f, 0.4f), 
                                             new Vector2(0.52f, 0.44f), new Vector2(0.52f, 0.48f), new Vector2(0.52f, 0.52f), new Vector2(0.52f, 0.56f), new Vector2(0.52f, 0.6f), new Vector2(0.52f, 0.64f), 
                                             new Vector2(0.52f, 0.68f), new Vector2(0.52f, 0.72f), new Vector2(0.52f, 0.76f), new Vector2(0.52f, 0.8f), new Vector2(0.52f, 0.84f), new Vector2(0.52f, 0.88f), 
                                             new Vector2(0.52f, 0.92f), new Vector2(0.52f, 0.96f), new Vector2(0.56f, 0f), new Vector2(0.56f, 0.04f), new Vector2(0.56f, 0.08f), new Vector2(0.56f, 0.12f), 
                                             new Vector2(0.56f, 0.16f), new Vector2(0.56f, 0.2f), new Vector2(0.56f, 0.24f), new Vector2(0.56f, 0.28f), new Vector2(0.56f, 0.32f), new Vector2(0.56f, 0.36f), 
                                             new Vector2(0.56f, 0.4f), new Vector2(0.56f, 0.44f), new Vector2(0.56f, 0.48f), new Vector2(0.56f, 0.52f), new Vector2(0.56f, 0.56f), new Vector2(0.56f, 0.6f), 
                                             new Vector2(0.56f, 0.64f), new Vector2(0.56f, 0.68f), new Vector2(0.56f, 0.72f), new Vector2(0.56f, 0.76f), new Vector2(0.56f, 0.8f), new Vector2(0.56f, 0.84f), 
                                             new Vector2(0.56f, 0.88f), new Vector2(0.56f, 0.92f), new Vector2(0.56f, 0.96f), new Vector2(0.6f, 0f), new Vector2(0.6f, 0.04f), new Vector2(0.6f, 0.08f), 
                                             new Vector2(0.6f, 0.12f), new Vector2(0.6f, 0.16f), new Vector2(0.6f, 0.2f), new Vector2(0.6f, 0.24f), new Vector2(0.6f, 0.28f), new Vector2(0.6f, 0.32f), 
                                             new Vector2(0.6f, 0.36f), new Vector2(0.6f, 0.4f), new Vector2(0.6f, 0.44f), new Vector2(0.6f, 0.48f), new Vector2(0.6f, 0.52f), new Vector2(0.6f, 0.56f), 
                                             new Vector2(0.6f, 0.6f), new Vector2(0.6f, 0.64f), new Vector2(0.6f, 0.68f), new Vector2(0.6f, 0.72f), new Vector2(0.6f, 0.76f), new Vector2(0.6f, 0.8f), 
                                             new Vector2(0.6f, 0.84f), new Vector2(0.6f, 0.88f), new Vector2(0.6f, 0.92f), new Vector2(0.6f, 0.96f), new Vector2(0.64f, 0f), new Vector2(0.64f, 0.04f), 
                                             new Vector2(0.64f, 0.08f), new Vector2(0.64f, 0.12f), new Vector2(0.64f, 0.16f), new Vector2(0.64f, 0.2f), new Vector2(0.64f, 0.24f), new Vector2(0.64f, 0.28f), 
                                             new Vector2(0.64f, 0.32f), new Vector2(0.64f, 0.36f), new Vector2(0.64f, 0.4f), new Vector2(0.64f, 0.44f), new Vector2(0.64f, 0.48f), new Vector2(0.64f, 0.52f), 
                                             new Vector2(0.64f, 0.56f), new Vector2(0.64f, 0.6f), new Vector2(0.64f, 0.64f), new Vector2(0.64f, 0.68f), new Vector2(0.64f, 0.72f), new Vector2(0.64f, 0.76f), 
                                             new Vector2(0.64f, 0.8f), new Vector2(0.64f, 0.84f), new Vector2(0.64f, 0.88f), new Vector2(0.64f, 0.92f), new Vector2(0.64f, 0.96f), new Vector2(0.68f, 0f), 
                                             new Vector2(0.68f, 0.04f), new Vector2(0.68f, 0.08f), new Vector2(0.68f, 0.12f), new Vector2(0.68f, 0.16f), new Vector2(0.68f, 0.2f), new Vector2(0.68f, 0.24f), 
                                             new Vector2(0.68f, 0.28f), new Vector2(0.68f, 0.32f), new Vector2(0.68f, 0.36f), new Vector2(0.68f, 0.4f), new Vector2(0.68f, 0.44f), new Vector2(0.68f, 0.48f), 
                                             new Vector2(0.68f, 0.52f), new Vector2(0.68f, 0.56f), new Vector2(0.68f, 0.6f), new Vector2(0.68f, 0.64f), new Vector2(0.68f, 0.68f), new Vector2(0.68f, 0.72f), 
                                             new Vector2(0.68f, 0.76f), new Vector2(0.68f, 0.8f), new Vector2(0.68f, 0.84f), new Vector2(0.68f, 0.88f), new Vector2(0.68f, 0.92f), new Vector2(0.68f, 0.96f), 
                                             new Vector2(0.72f, 0f), new Vector2(0.72f, 0.04f), new Vector2(0.72f, 0.08f), new Vector2(0.72f, 0.12f), new Vector2(0.72f, 0.16f), new Vector2(0.72f, 0.2f), 
                                             new Vector2(0.72f, 0.24f), new Vector2(0.72f, 0.28f), new Vector2(0.72f, 0.32f), new Vector2(0.72f, 0.36f), new Vector2(0.72f, 0.4f), new Vector2(0.72f, 0.44f), 
                                             new Vector2(0.72f, 0.48f), new Vector2(0.72f, 0.52f), new Vector2(0.72f, 0.56f), new Vector2(0.72f, 0.6f), new Vector2(0.72f, 0.64f), new Vector2(0.72f, 0.68f), 
                                             new Vector2(0.72f, 0.72f), new Vector2(0.72f, 0.76f), new Vector2(0.72f, 0.8f), new Vector2(0.72f, 0.84f), new Vector2(0.72f, 0.88f), new Vector2(0.72f, 0.92f), 
                                             new Vector2(0.72f, 0.96f), new Vector2(0.76f, 0f), new Vector2(0.76f, 0.04f), new Vector2(0.76f, 0.08f), new Vector2(0.76f, 0.12f), new Vector2(0.76f, 0.16f), 
                                             new Vector2(0.76f, 0.2f), new Vector2(0.76f, 0.24f), new Vector2(0.76f, 0.28f), new Vector2(0.76f, 0.32f), new Vector2(0.76f, 0.36f), new Vector2(0.76f, 0.4f), 
                                             new Vector2(0.76f, 0.44f), new Vector2(0.76f, 0.48f), new Vector2(0.76f, 0.52f), new Vector2(0.76f, 0.56f), new Vector2(0.76f, 0.6f), new Vector2(0.76f, 0.64f), 
                                             new Vector2(0.76f, 0.68f), new Vector2(0.76f, 0.72f), new Vector2(0.76f, 0.76f), new Vector2(0.76f, 0.8f), new Vector2(0.76f, 0.84f), new Vector2(0.76f, 0.88f), 
                                             new Vector2(0.76f, 0.92f), new Vector2(0.76f, 0.96f), new Vector2(0.8f, 0f), new Vector2(0.8f, 0.04f), new Vector2(0.8f, 0.08f), new Vector2(0.8f, 0.12f), 
                                             new Vector2(0.8f, 0.16f), new Vector2(0.8f, 0.2f), new Vector2(0.8f, 0.24f), new Vector2(0.8f, 0.28f), new Vector2(0.8f, 0.32f), new Vector2(0.8f, 0.36f), 
                                             new Vector2(0.8f, 0.4f), new Vector2(0.8f, 0.44f), new Vector2(0.8f, 0.48f), new Vector2(0.8f, 0.52f), new Vector2(0.8f, 0.56f), new Vector2(0.8f, 0.6f), 
                                             new Vector2(0.8f, 0.64f), new Vector2(0.8f, 0.68f), new Vector2(0.8f, 0.72f), new Vector2(0.8f, 0.76f), new Vector2(0.8f, 0.8f), new Vector2(0.8f, 0.84f), 
                                             new Vector2(0.8f, 0.88f), new Vector2(0.8f, 0.92f), new Vector2(0.8f, 0.96f), new Vector2(0.84f, 0f), new Vector2(0.84f, 0.04f), new Vector2(0.84f, 0.08f), 
                                             new Vector2(0.84f, 0.12f), new Vector2(0.84f, 0.16f), new Vector2(0.84f, 0.2f), new Vector2(0.84f, 0.24f), new Vector2(0.84f, 0.28f), new Vector2(0.84f, 0.32f), 
                                             new Vector2(0.84f, 0.36f), new Vector2(0.84f, 0.4f), new Vector2(0.84f, 0.44f), new Vector2(0.84f, 0.48f), new Vector2(0.84f, 0.52f), new Vector2(0.84f, 0.56f), 
                                             new Vector2(0.84f, 0.6f), new Vector2(0.84f, 0.64f), new Vector2(0.84f, 0.68f), new Vector2(0.84f, 0.72f), new Vector2(0.84f, 0.76f), new Vector2(0.84f, 0.8f), 
                                             new Vector2(0.84f, 0.84f), new Vector2(0.84f, 0.88f), new Vector2(0.84f, 0.92f), new Vector2(0.84f, 0.96f), new Vector2(0.88f, 0f), new Vector2(0.88f, 0.04f), 
                                             new Vector2(0.88f, 0.08f), new Vector2(0.88f, 0.12f), new Vector2(0.88f, 0.16f), new Vector2(0.88f, 0.2f), new Vector2(0.88f, 0.24f), new Vector2(0.88f, 0.28f), 
                                             new Vector2(0.88f, 0.32f), new Vector2(0.88f, 0.36f), new Vector2(0.88f, 0.4f), new Vector2(0.88f, 0.44f), new Vector2(0.88f, 0.48f), new Vector2(0.88f, 0.52f), 
                                             new Vector2(0.88f, 0.56f), new Vector2(0.88f, 0.6f), new Vector2(0.88f, 0.64f), new Vector2(0.88f, 0.68f), new Vector2(0.88f, 0.72f), new Vector2(0.88f, 0.76f), 
                                             new Vector2(0.88f, 0.8f), new Vector2(0.88f, 0.84f), new Vector2(0.88f, 0.88f), new Vector2(0.88f, 0.92f), new Vector2(0.88f, 0.96f), new Vector2(0.92f, 0f), 
                                             new Vector2(0.92f, 0.04f), new Vector2(0.92f, 0.08f), new Vector2(0.92f, 0.12f), new Vector2(0.92f, 0.16f), new Vector2(0.92f, 0.2f), new Vector2(0.92f, 0.24f), 
                                             new Vector2(0.92f, 0.28f), new Vector2(0.92f, 0.32f), new Vector2(0.92f, 0.36f), new Vector2(0.92f, 0.4f), new Vector2(0.92f, 0.44f), new Vector2(0.92f, 0.48f), 
                                             new Vector2(0.92f, 0.52f), new Vector2(0.92f, 0.56f), new Vector2(0.92f, 0.6f), new Vector2(0.92f, 0.64f), new Vector2(0.92f, 0.68f), new Vector2(0.92f, 0.72f), 
                                             new Vector2(0.92f, 0.76f), new Vector2(0.92f, 0.8f), new Vector2(0.92f, 0.84f), new Vector2(0.92f, 0.88f), new Vector2(0.92f, 0.92f), new Vector2(0.92f, 0.96f), 
                                             new Vector2(0.96f, 0f), new Vector2(0.96f, 0.04f), new Vector2(0.96f, 0.08f), new Vector2(0.96f, 0.12f), new Vector2(0.96f, 0.16f), new Vector2(0.96f, 0.2f), 
                                             new Vector2(0.96f, 0.24f), new Vector2(0.96f, 0.28f), new Vector2(0.96f, 0.32f), new Vector2(0.96f, 0.36f), new Vector2(0.96f, 0.4f), new Vector2(0.96f, 0.44f), 
                                             new Vector2(0.96f, 0.48f), new Vector2(0.96f, 0.52f), new Vector2(0.96f, 0.56f), new Vector2(0.96f, 0.6f), new Vector2(0.96f, 0.64f), new Vector2(0.96f, 0.68f), 
                                             new Vector2(0.96f, 0.72f), new Vector2(0.96f, 0.76f), new Vector2(0.96f, 0.8f), new Vector2(0.96f, 0.84f), new Vector2(0.96f, 0.88f), new Vector2(0.96f, 0.92f), 
                                             new Vector2(0.96f, 0.96f) };

        public StaticMesh1(Demo demo, int instanceIndex)
        {
            this.demo = demo;
            instanceIndexName = " " + instanceIndex.ToString();
        }

        public void Initialize(PhysicsScene scene)
        {
            this.scene = scene;
        }

        public static void CreateShapes(Demo demo, PhysicsScene scene)
        {
            TriangleMesh triangleMesh = scene.Factory.TriangleMeshManager.Create("TriangleMesh1");

            TriangleMeshRegion r = triangleMesh.TriangleMeshRegionManager.Create(null);

            for (int i = 0; i < meshPositions.Length; i++)
            {
                Vertex v = r.VertexManager.Create(null);

                v.SetPosition(ref meshPositions[i]);
                v.SetTexture(ref meshTextures[i]);
            }

            for (int i = 0; i < meshIndices.Length; i += 3)
            {
                Triangle t = r.TriangleManager.Create(null);

                t.Index1 = meshIndices[i];
                t.Index2 = meshIndices[i + 1];
                t.Index3 = meshIndices[i + 2];
            }

            triangleMesh.Update(true, false);

            if (!demo.Meshes.ContainsKey("TriangleMesh1"))
                demo.Meshes.Add("TriangleMesh1", new DemoMesh(demo, triangleMesh, demo.Textures["Default"], Vector2.One, true, true, true, false, true, RasterizerState.CullNone, false));

            int triangleCount = 0;
            float[] frictions = null;
            float[] restitutions = null;

            triangleCount = triangleMesh.GetTriangleCount();
            frictions = new float[triangleCount];
            restitutions = new float[triangleCount];

            for (int i = 0; i < triangleCount; i++)
            {
                frictions[i] = 1.0f;
                restitutions[i] = 0.0f;
            }

            ShapePrimitive shapePrimitive = scene.Factory.ShapePrimitiveManager.Create("TriangleMesh1");
            shapePrimitive.CreateTriangleMesh(200, frictions, restitutions, triangleMesh);

            Shape shape = scene.Factory.ShapeManager.Create("TriangleMesh1");
            shape.Set(shapePrimitive, Matrix.Identity, 0.1f);
        }

        public void Create(Vector3 objectPosition, Vector3 objectScale, Quaternion objectOrientation)
        {
            PhysicsObject objectBase = null;
            Shape shape = scene.Factory.ShapeManager.Find("TriangleMesh1");

            objectBase = scene.Factory.PhysicsObjectManager.Create("TriangleMesh1" + instanceIndexName);
            objectBase.Shape = shape;
            objectBase.UserTagStr = "TriangleMesh1";
            objectBase.InitLocalTransform.SetPosition(ref objectPosition);
            objectBase.InitLocalTransform.SetScale(ref objectScale);
            objectBase.InitLocalTransform.SetOrientation(ref objectOrientation);
            objectBase.EnableCursorInteraction = true;
            objectBase.InternalControllers.CreateTriangleMeshController(true);

            scene.UpdateFromInitLocalTransform(objectBase);
        }
    }
}
